home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 27
/
CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso
/
CUCD
/
Online
/
NewsRog
/
ARexx
/
SendToYam.rexx
Wrap
OS/2 REXX Batch file
|
1998-06-02
|
678b
|
33 lines
/* -- procedure to send article via email using YAM ----------------------- */
/* Argument parsing in ARexx is brain-damaged */
parse arg '"' ReplyTo '"' ':=:' '"' Subj '"' ':=:' '"' FSpec '"' rest
/* Prepend Re: if needed */
if left(Subj,4) ~= 'Re: '
then Subj='Re: '||Subj
/* If YAM isn't running, try to launch it */
if pos('YAM', (show(ports))) = 0 then do
address command 'run YAM:YAM'
do while pos('YAM', (show(ports))) == 0
address command 'wait 1 sec'
end
end
/* Ship it off to YAM, again handling ARexx brain-damage */
address YAM
Show
MailWrite
WriteMailTo '"'||ReplyTo||'"'
WriteSubject '"'||Subj||'"'
WriteLetter '"'||FSpec||'"'
return 0